﻿using System;
class main
{
    public static void Main(string []args)
    {
        List<int> list = new List<int>();
        Random rnd = new Random();
        for(int i = 0; i < 100; i++)
        {
            list.Add(rnd.Next(1000));
        }
        var result = from n in list orderby list select n;
        int sum=result.Sum();
        Console.WriteLine(sum);
        int max=result.Max();
        Console.WriteLine(max); 
        double avg=result.Average();
        Console.WriteLine(avg);
        
    }
}
